<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
  <head>
    <title>${appTitle}</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
	<link href="${contextPath}/css/bootstrap.min.css" rel="stylesheet" media="screen"/>
	<link href="${contextPath}/css/core.css" rel="stylesheet"/>
	<link rel="shortcut icon" type="image/png" href="${contextPath}/img/favicon.ico" />
  </head>
  <body>
	<div class="container body-container">
		<%@ include file="header.jsp"%>
		<div class="row">
			<br>
	      <div class="span8 offset2">
				<form class="form-horizontal" action="${contextPath}/login" method="post">
					<legend>用户登录</legend>
					<c:if test="cfg.registable">
				  <div class="control-group">
				    <label class="control-label" for="">没有帐号直接登录→</label>
				    <div class="controls">
				      <div class="ds-login"></div>
				    </div>
				  </div>
				  </c:if>
				  <br>
				  <div class="control-group">
				    <label class="control-label" for="username">邮箱</label>
				    <div class="controls">
				      <input type="text" name="username" placeholder="注册时的邮箱" value="${username}">
				      <span class="help-inline">${shiroLoginFailure}</span>
				    </div>
				  </div>
				  <div class="control-group">
				    <label class="control-label" for="password">密码</label>
				    <div class="controls">
				      <input type="password" name="password" placeholder="注册时的密码">
				      <span class="help-inline"></span>
				    </div>
				  </div>
				  <div class="control-group">
				    <label class="control-label" for="captcha">验证码</label>
				    <div class="controls">
				      <input type="text" name="captcha" class="span1" placeholder="随便">
				      <img src="${contextPath}/captcha" class="img-rounded" style="width:60px;height:30px;padding:0 15px;" />
				      <a href="#">换一张吧!</a>
				      <span class="help-inline"></span>
				    </div>
				  </div>
				  <div class="control-group">
				    <div class="controls">
				      <label class="checkbox">
				        <input type="checkbox" name="rememberMe"> 下次自动登录
				      </label>
				    </div>
				  </div>
				  <div class="control-group">
				    <div class="controls">
				      <button type="submit" class="btn btn-primary">登录</button>
				      &nbsp;<a href="">忘记密码？</a>
				    </div>
				  </div>
				  <c:if test="cfg.registable">
				  <div class="control-group">
				    <div class="controls">
				      <h4>没有帐号?去<a href="${contextPath}/regist">注册</a></h4>
				    </div>
				  </div>
				  </c:if>
				</form>
	      </div><!--/span-->
		</div>
		<%@ include file="footer.jsp"%>
	</div>
	<script src="${contextPath}/js/jquery-1.8.2.js"></script>
	<script src="${contextPath}/js/bootstrap.js"></script>
	<script src="${contextPath}/js/utils.js"></script>
<script type="text/javascript">
$(".form-horizontal input").tooltip();
</script>
  </body>
</html>